package com.mytv.entity;

import com.mytv.dao.IEntity;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.*;

/**
 * 
 * @author Sirius
 */
@Entity
@Table(name="movieUser")
public class MovieUser  implements IEntity {
    
    private Integer id;
    private String code;
    private String nickname;
    private String password;
    
    public MovieUser() {
    }
	
    public MovieUser(String nickname) {
        this.nickname = nickname;
    }
    
    @Id
    @GeneratedValue(strategy=IDENTITY)
    @Column(name="id", unique=true, nullable=false)
    @Override
    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    
    @Column(name="code", nullable=false, length=32)
    @Override
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
    
    @Column(name="nickname", nullable=false, length=16)
    public String getNickname() {
        return this.nickname;
    }
    
    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
    
    @Column(name="password", nullable=false, length=32)
    public String getPassword() {
        return this.password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
}